/**
 * 装车控制
 * @author: xiaoxujs
 */

import { basicIp, newHttpService } from "../../../api/http";
import { ITlplTLaneLaneAddParams, ITlplTLaneLaneParamUpdateParams, ITlplTLaneLaneUpdate, ITlplTLaneUpdateLaneState } from "../../../type/remoteControl/loadingControlList";

//  车道列表
export const getTlplTLaneList = () => {
    const url = basicIp + '/tlpl/t-lane/list';
    return newHttpService.getData(url);
}
// 车道列表 - 删除
export const getTlplTLaneDeleteById = (params: { laneId: string }) => {
    const url = basicIp + '/tlpl/t-lane/deleteById';
    return newHttpService.postData(url, params);
}
// 车道列表 - 状态修改
export const getTlplTLaneUpdateLaneState = (params: ITlplTLaneUpdateLaneState) => {
    const url = basicIp + '/tlpl/t-lane/updateLaneState';
    return newHttpService.getData(url, params); 
}
//  编辑车道
export const postTlplTLaneLaneUpdate = (data: ITlplTLaneLaneUpdate) => {
    const url = basicIp + '/tlpl/t-lane/laneUpdate';
    return newHttpService.postData(url, data);
}


// 查询车道参数
export const getTlplTLaneQueryLaneParam = (data: {laneId: string}) => {
    const url = basicIp + '/tlpl/t-lane/queryLaneParam';
    return newHttpService.getData(url, data); 
}

// 查询一次计量抓拍机相机参数
export const getTlplTLaneQueryTarePhotoParam = (data: {laneId: string}) => {
    const url = basicIp + '/tlpl/t-lane/queryTarePhotoParam';
    return newHttpService.getData(url, data);
}
// 查询二次计量抓拍相机参数
export const getTlplTLaneQueryRoughPhotoParam = (data: {laneId: string}) => {
    const url = basicIp + '/tlpl/t-lane/queryRoughPhotoParam';
    return newHttpService.getData(url, data);
}
//  查询直播参数 - rtsp 参数
export const getTlplTLaneQueryRTSPParam = (data: {laneId: string}) => {
    const url = basicIp + '/tlpl/t-lane/queryRTSPParam';
    return newHttpService.getData(url, data);
}

// 装车控制——添加车道
export const postTlplTLaneLaneAdd = (data: ITlplTLaneLaneAddParams) => {
    const url = basicIp + '/tlpl/t-lane/laneAdd';
    return newHttpService.postData(url, data); 
}
// 编辑车道参数
export const postTlplTLaneLaneParamUpdate = (data: ITlplTLaneLaneParamUpdateParams) => {
    const url = basicIp + '/tlpl/t-lane/laneParamUpdate';
    return newHttpService.postData(url, data);
}
//  查询抓拍相机RTSP地址

export const getTlplTLaneQueryRTSP = (data: {laneId: string}) => {
    const url = basicIp + '/tlpl/t-lane/queryRTSP';
    return newHttpService.getData(url, data);
}

